import 'package:flutter/material.dart';
import 'package:love_app/common/su.dart';
import 'package:love_app/enum/bottom_appbar.dart';

class BottomAppbarCheckModel with ChangeNotifier{

  // 主页
  bool homePage = true;

  // 社区页面
  bool communityPage = false;

  // 我的页面
  bool minePage = false;

  // 选择的页面
  void check(BottomAppBarType type){
    _initAllTofalse();
    if(type == BottomAppBarType.homePage){
      homePage = true;
    }
    if(type == BottomAppBarType.communityPage){
      communityPage = true;
    }
    if(type == BottomAppBarType.minePage){
      minePage = true;
    }
  }

  // 取消所有选择
  void _initAllTofalse(){
    homePage = false;
    communityPage = false;
    minePage = false;
  }

}